package com.chengqj.factory.abstractfactory;

/**
 * @program: pattern
 * @description: 具体产品角色
 * @author: chengqj
 * @create: 2018-08-06 20:02
 **/
public class EntityFactory implements AbstractFactory {
    @Override
    public ProductA getProductAInstance() {
        return new EntityProductA();
    }

    @Override
    public ProductB getProductBInstance() {
        return new EntityProductB();
    }

    public static void main(String[] args) {
        AbstractFactory factory = new EntityFactory();
        ProductA productA = factory.getProductAInstance();
        ProductB productB = factory.getProductBInstance();
    }
}
